﻿using System.ServiceModel;
using System.ServiceModel.Web;
using System.Collections.Generic;
using System.IO;
using System.Collections.Specialized;
using System.Web;

namespace RestService
{
    
    [ServiceContract]
    public interface IRestServiceImpl
    {

        [OperationContract]
        [WebGet(
            ResponseFormat = WebMessageFormat.Xml,
            BodyStyle = WebMessageBodyStyle.Bare,
            UriTemplate = "fanuc?type={type}")     ]
        RobotResponse robotGeneralInfo(string type);

        [OperationContract]
        [WebGet(
            ResponseFormat = WebMessageFormat.Xml,            
            BodyStyle = WebMessageBodyStyle.Bare,
            UriTemplate = "ping")]
        RobotResponse ping();

         [OperationContract]
         [WebInvoke(Method = "PUT",
             ResponseFormat = WebMessageFormat.Xml,
             BodyStyle = WebMessageBodyStyle.Bare,
             UriTemplate = "fanuc/connection")]
        void robotConnect(Stream body);

         [OperationContract]
         [WebInvoke(Method = "POST",
             ResponseFormat = WebMessageFormat.Xml,
             BodyStyle = WebMessageBodyStyle.Bare,
             UriTemplate = "fanuc/connection")]
         void robotConnect_post(Stream body);

         [OperationContract]
         [WebInvoke(Method = "GET",
             ResponseFormat = WebMessageFormat.Xml,
             UriTemplate = "fanuc/connection")]
         RobotResponse robotIsConnected();        

         [OperationContract]
         [WebInvoke(Method = "GET",
            ResponseFormat = WebMessageFormat.Xml,
            UriTemplate = "fanuc/position?format={format}")]
         RobotPosition robotGetPosition(string format);

         [OperationContract]
         [WebInvoke(Method = "POST",
             UriTemplate = "fanuc/position?format={format}")]
          void robotMoveToPosition(Stream body, string format);
                      
        
       
    }

}